<%= error_messages_for 'variation' %>

<!--[form:variation]-->
<table>
	<tr>
		<td>Option</td>
		<td>  
		  <select name="option_id" id="option_id" style="width:200px">
        <%= options_from_collection_for_select(@all_options, :id, :name) -%>
      </select>
    </td>
    <td>Option Value</td>
    <td>
      <%= render :partial => 'option_values' -%>  
    </td>
    <td><%= link_to_function "+", "alert('foo!')" %></td>
    <td>-</td>
	</tr>
  <tr>
    <td>Name: </td>
    <td><%= form.text_field :name %></td>
    <td>Sku: </td>
    <td><%= form.text_field :name %></td>
    <td></td>
  </tr>
</table>	

<%= observe_field :option_id,
									:update => 'ajaxWrapper',
									:url => {:action => 'option_values', :only_path => false},
                  :with => "'option_id=' +value" -%>
	
<!--[eoform:variation]-->